package com.neuresys.database.databaseimpl.jssqlite;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
import com.neuresys.database.databaseapi.Database;
import com.google.gwt.typedarrays.client.Uint8ArrayNative;
public final class SQLiteDatabase  implements Database {

	
	protected SQLiteDatabase()
	{
		
	}
	
//	public native void setValue(JavaScriptObject str) /*-{
//	this.value=str;
//	}-*/;
//	public native JavaScriptObject getValue() /*-{
//		// TODO Auto-generated method stub
//		return this.value;
//	}-*/;
	public native static  String stringify(Uint8ArrayNative obj) 
	/*-{
	console.log("stringify"+(obj));
		console.log("stringify"+$wnd.JSON.stringify(obj));
		console.log($wnd.JSON.stringify(obj).length);
		console.log(typeof obj);
		
    return @com.neuresys.database.databaseimpl.jssqlite.Base64Coder::encodeString(Ljava/lang/String;)(obj);
}-*/;
	
 public static native Uint8ArrayNative parse(String json)/*-{
     var result= (@com.neuresys.database.databaseimpl.jssqlite.Base64Coder::decodeString(Ljava/lang/String;)(json));

	
      	return result;
 }-*/;


}


